package com.itheima.springbootwebtlias.mapper;


import com.github.pagehelper.Page;
import com.itheima.springbootwebtlias.pojo.Student;
import com.itheima.springbootwebtlias.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    List<Student> selectbyCondition(StudentQueryParam studentQueryParam);

    void addStudent(Student student);

    Student selectByIdStudent(Integer id);

    void updataStudent(Student student);

    void updataByIdScoreViolation(Integer id, Integer score);

    @MapKey("name")
    List<Map> selectDegree();

    @Select("select count(*) from student where clazz_id = #{id};")
    Integer deleteCountClazz(Integer id);


    void deleteByIdStudent(List<Integer> ids);
}
